home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / id-utils.2 / id-utils / id-utils-3.2 / lib / xdirent.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-09  |  1.6 KB  |  54 lines

  1. /* xdirent.h -- dirent declarations wrapper
  2.    Copyright (C) 1996 Free Software Foundation, Inc.
  3.  
  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 2, or (at your option)
  7.    any later version.
  8.  
  9.    This program is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.    GNU General Public License for more details.
  13.  
  14.    You should have received a copy of the GNU General Public License
  15.    along with this program; if not, write to the Free Software
  16.    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17. */
  18.  
  19. #ifndef _xdirent_h_
  20. #define _xdirent_h_
  21.  
  22. #if HAVE_DIRENT_H
  23. # include <dirent.h>
  24. #endif
  25. #if HAVE_NDIR_H
  26. # include <ndir.h>
  27. #endif
  28. #if HAVE_SYS_DIR_H
  29. # include <sys/dir.h>
  30. #endif
  31. #if HAVE_SYS_NDIR_H
  32. # include <sys/ndir.h>
  33. #endif
  34.  
  35. /* Interpret `HAVE_LINK' as meaning `UN*X style' directory structure
  36.    (e.g., A single root called `/', with `/' separating links), and
  37.    !HAVE_LINK as `DOS|OS/2|Windows style' (e.g., Multiple root volues
  38.    named `x:', with `\' separating links).  */
  39.  
  40. #if HAVE_LINK
  41. # define IS_ABSOLUTE(_dir_) ((_dir_)[0] == '/')
  42. # define SLASH_STRING "/"
  43. # define SLASH_CHAR '/'
  44. # define DOT_DOT_SLASH "../"
  45. #else
  46. /* NEEDSWORK: prefer forward-slashes as a user-configurable option.  */
  47. # define IS_ABSOLUTE(_dir_) ((_dir_)[1] == ':')
  48. # define SLASH_STRING "\\/"
  49. # define SLASH_CHAR '\\'
  50. # define DOT_DOT_SLASH "..\\"
  51. #endif
  52.  
  53. #endif /* not _xdirent_h_ */
  54.